﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace MetaCollection.ContentService.WebDav
{
	public class ResourcePropertyComparer : IEqualityComparer<IResourceProperty>
	{
		public bool Equals(IResourceProperty x, IResourceProperty y)
		{
			if (x != null && y != null)
				return x.Name.LocalName.Equals(y.Name.LocalName, StringComparison.OrdinalIgnoreCase);
			else
				return x == null && y == null;
		}

		public int GetHashCode(IResourceProperty obj)
		{
			return obj.GetHashCode();
		}
	}
}
